package com.schema2uml;

import java.io.FileInputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

public class Schema2UML {
	
	private final static Logger logger = Logger.getLogger(Schema2UML.class);

	public static void main(String[] args) {

		Properties properties = new Properties();

		try {
			properties.load(new FileInputStream("src/schema2uml.properties"));
		
			Schema2UMLTransformer transformer = new Schema2UMLTransformer(
				properties.getProperty("driver"),
				properties.getProperty("connection"), 
				properties.getProperty("user"), 
				properties.getProperty("password"), 
				properties.getProperty("schema"),
				properties.getProperty("tablePattern"),
				properties.getProperty("columnPattern"),
				properties.getProperty("mappings"),
				properties.getProperty("rules"),
				properties.getProperty("model"), 
				properties.getProperty("modelName"),
				properties.getProperty("packageName"),
				properties.getProperty("profile"),
				properties.getProperty("stereotypeObject"),
				properties.getProperty("stereotypeProperty"),
				properties.getProperty("stereotypeAssociation"),
				properties.getProperty("umlResources")
				);
		
		transformer.transform();
		
		} catch (Exception e) {
			logger.error(e, e);
		}
				
	}

}
